package org.example.design.visitor.visitor.impl;

import org.example.design.visitor.user.impl.Student;
import org.example.design.visitor.user.impl.Teacher;
import org.example.design.visitor.visitor.Visitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Classname Parent
 * @Description 访问者（家长）
 * @Date 2020/11/12 2:36 下午
 * @Created by xiangjd
 */
public class Parent implements Visitor {

    private Logger logger = LoggerFactory.getLogger(Parent.class);

    @Override
    public void visist(Student student) {
        logger.info("学生信息 姓名: {},班级: {}，排名: {}", student.name, student.clazz, student.ranking());
    }

    @Override
    public void visist(Teacher teacher) {
        logger.info("老师信息 姓名: {},班级: {}，级别: {}", teacher.name, teacher.clazz, teacher.identity);
    }
}
